package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LogController {

    private Logger logger = LoggerFactory.getLogger(Logger.class);

    @RequestMapping("/test")
    public String test(){
        logger.error("error 级别日志");
        logger.info("info 级别日志");
        logger.debug("debug 级别日志");
        logger.warn("warn 级别日志");
        return "success";
    }
}
